<template>
    <div class="desc-container">
        <h1>{{info.title}}</h1>
        <hr>
        <div class="content" v-html="info.content"></div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            id:this.$route.params.id,
            info:{}
        }
    },
    created(){
        this.getdesc()
    },
    methods:{
        getdesc(){
            this.$http.get('api/goods/getdesc/'+this.id).then(
                response=>{
                    if(response.body.status==0){
                        this.info = response.body.message[0]
                        Toast({message:"获取本图文介绍ok",duration:500})
                    }
                    else{
                        Toast({message:"获取本图文介绍fail",duration:500})
                    }
                }
            )
        }
    }
}
</script>
<style lang="scss" >
.desc-container{
    h1{
        font-size:16px;
        text-align: center;
        padding:10px;
        color:#26a2ff
    }
    .content{
        img{
            width:100%;
        }
    }
    
}

</style>
